package a4;

import java.util.ArrayList;
import java.util.HashMap;


public class PosTaggerNoisy {
	
	private static HashMap<String, Integer> tCount;
	private static HashMap<String, Integer> tFirstCount;
	private static HashMap<String, Integer> ttCount;
	private static HashMap<String, HashMap<String, Integer>> wtCount;

	public static void main(String[] args) {
		tCount = new HashMap<String, Integer>();
		tFirstCount = new HashMap<String, Integer>();
		ttCount = new HashMap<String, Integer>();
		wtCount = new HashMap<String, HashMap<String, Integer>>();
		
		CorpusProcessor.run(tCount, tFirstCount, ttCount, wtCount);
		
//		System.out.println(tCount);
		
		ArrayList<String> words = new ArrayList<String>();
		words.add("the");
		words.add("economy");
		words.add("'s");
		words.add("temperature");
		words.add("will");
		
		ArrayList<ArrayList<String>> posGraph = getPosGraph(words);
		
		int[] possibilities = new int[words.size()];
		for (int i=0; i<posGraph.size(); i++){
			possibilities[i]=posGraph.get(i).size();
		}
		
		int[][] sequences = Sequences.getSequences(possibilities);
		
//		double 		
//		for (int i = 0; i<sequences.length;i++){
//			for (int j = 0; j<sequences[0].length;j++){
//				
//				sequences[i][j];
//			}
//		}
	}
	
	
	private static ArrayList<ArrayList<String>> getPosGraph(ArrayList<String> words){
		ArrayList<ArrayList<String>> result = new ArrayList<ArrayList<String>>();
		for (String s : words){
			ArrayList<String> a = new ArrayList<String>(wtCount.get(s).keySet());
			result.add(a);
		}
		return result;
	}
	
	
//	private static int[][] combinations(ArrayList<ArrayList<String>> posGraph){
//		int combinations = 1;
//		for (ArrayList<String> l : posGraph){
//			combinations *= l.size();
//		}
//		
//		int[][] combos = new int[combinations][posGraph.size()];
//		// OBS inte klart
//		int comboRow=0;
//		for (int i=0; i<posGraph.get(0).size(); i++){
//			for (int j=0; j<posGraph.get(1).size(); j++){
//				for (int k=0; k<posGraph.get(2).size(); k++){
//					for (int l=0; l<posGraph.get(3).size(); l++){
//						for (int m=0; m<posGraph.get(4).size(); m++){
//							combos[comboRow][0]=i;
//							combos[comboRow][1]=j;
//							combos[comboRow][2]=k;
//							combos[comboRow][3]=l;
//							combos[comboRow][4]=m;
//							comboRow++;
//						}
//					}
//				}
//			}
//		}
//		return combos;
//	}

}
